﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Services;
using Newtonsoft.Json;


namespace CSharpLearningWeb.Jquery
{
    public partial class JqueryAjax : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        public class Employee
        {
            public string Name;
            public int Age;
        }

        [WebMethod]
        public static string GetDate()
        {
            List<Employee> eList = new List<Employee>();
            Employee e = new Employee();
            e.Name = "Minal";
            e.Age = 24;

            eList.Add(e);

            e = new Employee();
            e.Name = "Santosh";
            e.Age = 24;

            eList.Add(e);

            string ans = JsonConvert.SerializeObject(eList, Formatting.Indented);
            return ans;
            //return DateTime.Now.ToString("dd/MMM/yyyy HH:mm:ss");
        }
    }
}